<template>
  <el-dialog
    append-to-body
    :title="title"
    center
    :visible.sync="openState"
    width="1024px"
    :close-on-click-modal="false"
  >
    <el-form ref="queryDetail" :model="form" label-width="110px" :disabled="true">
      <!--交易础信息-->
      <el-card class="form-card">
        <div slot="header" class="label-header-msg">
          <span>交易基础信息</span>
        </div>
        <el-row>
          <el-col :span="8">
            <el-form-item label="交易流水号" prop="id">
              <el-input v-model="form.id" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="行内流水号" prop="internalId1">
              <el-input v-model="form.internalId1" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="包批次号" prop="btId">
              <el-input v-model="form.btId" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="报文标识号" prop="pkgId">
              <el-input v-model="form.pkgId" />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="明细标识号" prop="dtlNo">
              <el-input v-model="form.dtlNo" />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="合同协议号" prop="contractNo">
              <el-input v-model="form.contractNo" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="CPG日期" prop="vdate">
              <el-date-picker v-model="form.vdate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="工作日期" prop="workdate">
              <el-date-picker v-model="form.workdate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="交易渠道" prop="source">
              <el-select style="width: 100%" v-model="form.source" placeholder="柜面交易">
                <el-option
                  v-for="dict in dictMap.TXN_SOURCE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="转发日期" prop="npcSndDate">
              <el-date-picker v-model="form.npcSndDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="回执期限" prop="bizRtrltd">
              <el-input v-model="form.bizRtrltd" />
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="地域标识" prop="regionid">
              <el-select style="width: 100%" v-model="form.regionid" placeholder="地域标识">
                <el-option
                  v-for="dict in dictMap.RegionId"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="业务类型" prop="bizTypeCode">
              <el-select
                style="width: 100%"
                v-model="
                  form.bizTypeCode === null || form.bizTypeCode === undefined
                    ? ''
                    : form.bizTypeCode + '-' + form.bizTypeCodeDesc
                "
                placeholder="业务类型"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="业务种类" prop="bizCtgyCode">
              <el-select
                style="width: 100%"
                v-model="
                  form.bizCtgyCode === null || form.bizCtgyCode === undefined
                    ? ''
                    : form.bizCtgyCode + '-' + form.bizCtgyCodeDesc
                "
                placeholder="业务种类"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="8">
            <el-form-item label="交易币种" prop="curcd">
              <el-input v-model="form.curcd" placeholder="货币种类" :disabled="true" style="width: 195px" />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="金额" prop="amount">
              <ht-amount-input v-model="form.amount" placeholder="交易金额" style="width: 195px"></ht-amount-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="大写金额" prop="bAmount">
              <ht-amount-upper :inputValue="form.amount" placeholder="交易金额" style="width: 195px"></ht-amount-upper>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="附言" prop="remark">
                <el-input type="textarea" v-model="form.remark" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-row>
      </el-card>

      <!--付款人信息-->
      <el-card class="form-card">
        <div slot="header" class="label-header-msg">
          <span>付款人信息</span>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="付款人账号" prop="payerActno">
              <el-input v-model="form.payerActno" placeholder="付款人账号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="付款行行号" prop="payerBrno">
              <el-input v-model="form.payerBrno" placeholder="付款行行号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-form-item label="付款人名称" prop="payerName">
            <el-input v-model="form.payerName" placeholder="付款人名称" />
          </el-form-item>
        </el-row>
        <el-row>
          <el-form-item label="付款人地址" prop="payerAddr">
            <el-input v-model="form.payerAddr" placeholder="付款人地址" />
          </el-form-item>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payer">
              <el-form-item label="付款人开户行号" prop="payerAccBrno">
                <el-input v-model="form.payerAccBrno" placeholder="付款人开户行行号" />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="16">
            <el-form-item label="付款人开户行行名" prop="payerAccBrname" label-width="130px">
              <el-input v-model="form.payerAccBrname" placeholder="付款人开户行行名" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <!--收款人信息-->
      <el-card class="form-card">
        <div slot="header" class="label-header-msg">
          <span>收款人信息</span>
        </div>
        <el-row :gutter="10">
          <el-col :span="12">
            <el-form-item label="收款人账号" prop="payeeActno">
              <el-input v-model="form.payeeActno" placeholder="收款人账号" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="收款行行号" prop="payeeBrno">
              <el-input v-model="form.payeeBrno" placeholder="收款行行号" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="收款人名称" prop="payeeName">
          <el-input v-model="form.payeeName" placeholder="收款人名称" />
        </el-form-item>
        <el-form-item label="收款人地址" prop="payeeAddr">
          <el-input v-model="form.payeeAddr" placeholder="收款人地址" />
        </el-form-item>
        <el-row :gutter="10"></el-row>
        <el-row :gutter="10">
          <el-col :span="8">
            <div class="grid-payee">
              <el-form-item label="收款人开户行号" prop="payeeAccBrno">
                <el-input v-model="form.payeeAccBrno" placeholder="收款人开户行行号" />
              </el-form-item>
            </div>
          </el-col>
          <el-col :span="16">
            <el-form-item label="收款人开户行行名" prop="payeeAccBrname" label-width="130px">
              <el-input v-model="form.payeeAccBrname" placeholder="收款人开户行行名" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <el-card class="form-card" v-show="this.form.bizTypeCode === 'B104'">
        <div slot="header" class="label-header-msg">
          <span>国库资金借记划拨附加数据域</span>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="信息流水号" prop="flowNb">
              <el-input v-model="form.flowNb" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="报表日期" prop="reportDate">
              <el-date-picker v-model="form.reportDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="报表序号" prop="reportNumber">
              <el-input v-model="form.reportNumber" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="上报国库代码" prop="reportCode">
              <el-input v-model="form.reportCode" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="接收国库代码" prop="receiveCode">
              <el-input v-model="form.receiveCode" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="预算级次" prop="budgetLevel">
              <el-select style="width: 100%" v-model="form.budgetLevel" placeholder="预算级次">
                <el-option
                  v-for="dict in dictMap.BUDGETLEVELCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="预算种类" prop="budgetType">
              <el-select style="width: 100%" v-model="form.budgetType" placeholder="预算种类">
                <el-option
                  v-for="dict in dictMap.BUDGETTYPECODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="调整期标志" prop="indicatorCode">
              <el-select style="width: 100%" v-model="form.indicatorCode" placeholder="调整期标志">
                <el-option
                  v-for="dict in dictMap.INDICATOR_CODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="明细条数" prop="dtlCount">
              <el-input v-model="form.dtlCount" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="明细汇总币种" prop="dtlCurcd1">
              <el-input v-model="form.dtlCurcd1" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="明细汇总金额" prop="dtlAmount">
              <ht-amount-input v-model="form.dtlAmount" placeholder="明细汇总金额" :disable="true"></ht-amount-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <ht-table
            ref="dataTableB104"
            :showSerialNumber="false"
            :multi-select="false"
            :reqConfig="reqConfigB104"
            :queryParams="queryParams"
            :tableBindColumns="tableBindColumnsB104"
            :showRightToolbar="false"
            :initData="false"
            :randomRowKey="true"
          ></ht-table>
        </el-row>
      </el-card>

      <el-card class="form-card" v-show="this.form.bizTypeCode === 'B307'">
        <div slot="header" class="label-header-msg">
          <span>国库资金国债兑付借记划拨附加数据域</span>
        </div>
        <el-row>
          <el-col :span="12">
            <el-form-item label="信息流水号" prop="flowNb">
              <el-input v-model="form.flowNb" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="报表日期" prop="reportDate">
              <el-date-picker v-model="form.reportDate2" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="报表序号" prop="reportNumber">
              <el-input v-model="form.reportNumber" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="上报国库代码" prop="reportCode">
              <el-input v-model="form.reportCode2" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="接收国库代码" prop="reportCode">
              <el-input v-model="form.receiveCode2" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="明细条数" prop="dtlCount">
              <el-input v-model="form.dtlCount" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="明细汇总币种" prop="dtlCurcd">
              <el-input v-model="form.dtlCurcd" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="明细汇总金额" prop="dtlAmount">
              <ht-amount-input v-model="form.dtlAmount" placeholder="明细汇总金额" :disable="true"></ht-amount-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <ht-table
            ref="dataTableB307"
            :showSerialNumber="false"
            :multi-select="false"
            :tableBindColumns="tableBindColumnsB307"
            :showRightToolbar="false"
            :initData="false"
            :queryParams="queryParams"
            :reqConfig="reqConfigB307"
            :randomRowKey="true"
          ></ht-table>
        </el-row>
      </el-card>

      <el-card class="form-card" v-show="this.form.bizTypeCode === 'B308'">
        <div slot="header" class="label-header-msg">
          <span>小额支付系统支票截留业务附加数据</span>
        </div>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="出票日期" prop="issueDate">
              <el-date-picker
                v-model="form.issueDate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="提示付款日期" prop="payDate">
              <el-date-picker
                v-model="form.payDate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="票据号码" prop="noteNumber">
              <el-input v-model="form.noteNumber" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="支付密码" prop="payPassword">
              <el-input v-model="form.payPassword" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="用途" prop="use">
              <el-input v-model="form.use" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="票据正面图像路径" prop="imgFrnData">
              <el-input type="textarea" v-model="form.imgFrnFileName" :disabled="true" />
              <el-button type="primary" v-show="form.imgFrnDownload!==undefined&&form.imgFrnDownload!==null"
                         icon="el-icon-search" plain @click="downloadFile(form.imgFrnDownload)">
                下载
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="票据背面图像路径" prop="imgBckData">
              <el-input type="textarea" v-model="form.imgBckFileName" :disabled="true" />
              <el-button type="primary" v-show="form.imgBckDownload!==undefined&&form.imgBckDownload!==null"
                         icon="el-icon-search" plain @click="downloadFile(form.imgBckDownload)">
                下载
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <el-card
        class="form-card"
        v-show="
          this.form.BIZ_TYPE_CODE === 'B309' || this.form.BIZ_TYPE_CODE === 'B310' || this.form.BIZ_TYPE_CODE === 'B311'
        "
      >
        <div slot="header" class="label-header-msg">
          <span>小额支付系统通用票据截留业务附加数据</span>
        </div>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="出票日期" prop="issueDate">
              <el-date-picker
                v-model="form.issueDate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="出票货币币种" prop="issueCurrcd">
              <el-input v-model="form.issueCurrcd" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出票金额" prop="issueAmount">
              <ht-amount-input v-model="form.issueAmount" placeholder="出票金额" :disable="true"></ht-amount-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="提示付款日期" prop="payDate">
              <el-date-picker
                v-model="form.payDate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="汇票到期日" prop="draftMaturity">
              <el-date-picker
                v-model="form.draftMaturity"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="票据号码" prop="noteNumber">
              <el-input v-model="form.noteNumber" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="支付密码" prop="payPassword">
              <el-input v-model="form.payPassword" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="票据密押" prop="draftKey">
              <el-input v-model="form.draftKey" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="承兑协议编号" prop="protoNo">
              <el-input v-model="form.protoNo" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="承兑日期" prop="acceptDate">
              <el-date-picker
                v-model="form.acceptDate"
                style="width: 100%"
                type="date"
                value-format="yyyyMMdd"
                :disabled="true"
              />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="承兑人" prop="acceptor">
              <el-input v-model="form.acceptor" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="申请人账号" prop="applyAccount">
              <el-input v-model="form.applyAccount" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="申请人名称" prop="applyName">
              <el-input v-model="form.applyName" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="出票人账号" prop="issueAccount">
              <el-input v-model="form.issueAccount" :disabled="true" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="出票人全称" prop="issueName">
              <el-input v-model="form.issueName" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="交易合同号码" prop="pactNumber">
              <el-input v-model="form.pactNumber" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="用途" prop="use">
              <el-input v-model="form.use" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="原收款人名称" prop="oriPayeeName">
              <el-input v-model="form.oriPayeeName" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="票据正面图像路径" prop="imgFrnData">
              <el-input type="textarea" v-model="form.imgFrnFileName" :disabled="true" />
              <el-button type="primary" v-show="form.imgFrnDownload!==undefined&&form.imgFrnDownload!==null"
                         icon="el-icon-search" plain @click="downloadFile(form.imgFrnDownload)">
                下载
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="24">
            <el-form-item label="票据背面图像路径" prop="imgBckData">
              <el-input type="textarea" v-model="form.imgBckFileName" :disabled="true" />
              <el-button type="primary" v-show="form.imgBckDownload!==undefined&&form.imgBckDownload!==null"
                         icon="el-icon-search" plain @click="downloadFile(form.imgBckDownload)">
                下载
              </el-button>
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>

      <el-card
        class="form-card"
        v-show="
          this.form.BIZ_TYPE_CODE === 'B309' || this.form.BIZ_TYPE_CODE === 'B310' || this.form.BIZ_TYPE_CODE === 'B311'
        "
      >
        <div slot="header" class="label-header-msg">
          <span>被背书人清单</span>
        </div>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="被背书人数" prop="endorserNumber">
              <el-input v-model="form.endorserNumber" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <ht-table
            ref="dataTableB309"
            :showSerialNumber="false"
            :multi-select="false"
            :reqConfig="reqConfigB309"
            :queryParams="queryParams"
            :tableBindColumns="tableBindColumnsB309"
            :showRightToolbar="false"
            :initData="false"
            :randomRowKey="true"
          ></ht-table>
        </el-row>
      </el-card>

      <el-card class="form-card">
        <div slot="header" class="label-header-msg">
          <span>其他信息</span>
        </div>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通讯状态" prop="status">
              <el-select style="width: 100%" v-model="form.status" placeholder="通讯状态">
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="中心状态" prop="procStatus">
              <el-select style="width: 100%" v-model="form.procStatus" placeholder="中心状态">
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="轧差日期" prop="chkDate">
              <el-date-picker v-model="form.chkDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="清算日期" prop="clrDate">
              <el-date-picker v-model="form.clrDate" style="width: 100%" type="date" value-format="yyyyMMdd" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="货币种类" prop="cud">
              <el-input v-model="form.cud" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="代理行手续费" prop="proxyFee">
              <ht-amount-input v-model="form.proxyFee" placeholder="代理行手续费" :disable="true"></ht-amount-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="业务回执状态" prop="bizRtStatus">
              <el-select style="width: 100%" v-model="form.bizRtStatus" placeholder="业务回执状态">
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="业务拒绝码" prop="rejectCode">
              <el-select
                style="width: 100%"
                v-model="
                  form.rejectCode === null || form.rejectCode === undefined
                    ? ''
                    : form.rejectCode + '-' + form.rejectCodeDesc
                "
                placeholder="业务拒绝码"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="业务拒绝原因" prop="rejectContent">
              <el-input type="textarea" v-model="form.rejectContent" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="回执附言" prop="receiptRemark">
              <el-input type="textarea" v-model="form.receiptRemark" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="业务处理码" prop="procCode">
              <el-select
                style="width: 100%"
                v-model="
                  form.procCode === null || form.procCode === undefined ? '' : form.procCode + '-' + form.procCodeDesc
                "
                placeholder="业务处理码"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="业务拒绝信息" prop="rejectInfo">
              <el-input type="textarea" v-model="form.rejectInfo" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="业务拒绝码" prop="rejectCode127">
              <el-select
                style="width: 100%"
                v-model="
                  form.rejectCode127 === null || form.rejectCode127 === undefined
                    ? ''
                    : form.rejectCode127 + '-' + form.rejectCode127Desc
                "
                placeholder="业务拒绝码"
                :disabled="true"
              ></el-select>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="业务拒绝原因" prop="rejectContent127">
              <el-input type="textarea" v-model="form.rejectContent127" :disabled="true" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="录入操作员" prop="mdTlrno">
              <el-input v-model="form.mdTlrno" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="录入时间" prop="mdTime">
              <el-date-picker
                style="width: 100%"
                v-model="form.mdTime"
                value-format="yyyyMMddHHmmss"
                type="datetime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="复核操作员" prop="ckTlrno">
              <el-input v-model="form.ckTlrno" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="复核时间" prop="ckTime">
              <el-date-picker
                style="width: 100%"
                v-model="form.ckTime"
                value-format="yyyyMMddHHmmss"
                type="datetime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="复核附言" prop="ckRemarks">
              <el-input type="textarea" v-model="form.ckRemarks" />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="12">
            <el-form-item label="审核操作员" prop="audTlrno">
              <el-input v-model="form.audTlrno" :disabled="true" />
            </el-form-item>
          </el-col>

          <el-col :span="12">
            <el-form-item label="审核时间" prop="audTime">
              <el-date-picker
                style="width: 100%"
                v-model="form.audTime"
                value-format="yyyyMMddHHmmss"
                type="datetime"
                :disabled="true"
              />
            </el-form-item>
          </el-col>
        </el-row>

        <el-row>
          <el-col :span="24">
            <el-form-item label="审核附言" prop="audRemarks">
              <el-input type="textarea" v-model="form.audRemarks" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="handleClose">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
import { ddetail, reqConfigB104, reqConfigB307, reqConfigB309 } from "@/api/cnaps/baseBiz/inquire/batch/index";
import HtAmountInput from "@/views/components/HtAmountInput";
import HtAmountUpper from "@/views/components/HtAmountUpper";
import { baseUrlConfig, downloadfile } from "@/api/authority_app/base";

export default {
  name: "detail6411",
  components: {
    HtAmountInput,
    HtAmountUpper,
  },
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      busTypeList: [],
      id: "",
      pkgNo: "",
      title: "",
      // 是否显示弹出层
      openState: false,
      queryParams: {
        id: "",
      },
      reqConfigB307: reqConfigB307,

      reqConfigB104: reqConfigB104,

      reqConfigB309: reqConfigB309,
      tableBindColumnsB104: [
        { prop: "deptCode", label: "征收机关大类代码", dictCode: "DEPT_CODE" },
        { prop: "subjectCode", label: "预算科目代码" },
        { prop: "curcd", label: "发生额币种", dictCode: "CURCD" },
        { prop: "amount", label: "发生额", type: "price" },
      ],
      tableBindColumnsB307: [
        { prop: "debtBankType", label: "兑付国债银行大类", dictCode: "DEBT_BANK_TYPE" },
        { prop: "capitalCode", label: "本金代码" },
        { prop: "capitalCurcd", label: "本金金额币种", dictCode: "CURCD" },
        { prop: "capitalAmount", label: "本金金额", type: "price" },
        { prop: "accrualCode", label: "利息代码" },
        { prop: "accrualCurcd", label: "利息金额币种", dictCode: "CURCD" },
        { prop: "accrualAmount", label: "利息金额", type: "price" },
      ],
      tableBindColumnsB309: [{ prop: "endorserName", label: "被背书人名称" }],

      // 表单参数
      form: {
        amount: "0.00",
      },
    };
  },
  mounted() {},
  methods: {
    // 关闭回掉
    handleClose() {
      this.openState = false;
    },
    show(id, pkgNo) {
      this.openState = true;
      if (id) {
        this.title = "小额批量打包明细明细";
        ddetail({
          id: id,
          pkgNo: pkgNo,
        }).then((res) => {
          this.$set(this, "form", res.result);
          if (this.form.imgFrnData !== undefined) {
            let imgFrnFileName = this.form.imgFrnData.split("||");
            if (imgFrnFileName.length > 1) {
              this.$set(this.form, "imgFrnFileName", imgFrnFileName[1]);
              this.$set(this.form, "imgFrnDownload", this.form.imgFrnData);
            }
          }
          if (this.form.imgBckData !== undefined) {
            let imgBckFileName = this.form.imgBckData.split("||");
            if (imgBckFileName.length > 1) {
              this.$set(this.form, "imgBckFileName", imgBckFileName[1]);
              this.$set(this.form, "imgBckDownload", this.form.imgBckData);
            }
          }
          this.$set(this.queryParams, "id", this.form.id);
          this.$nextTick(() => {
            if (this.form.bizTypeCode === "B307") {
              this.$refs.dataTableB307.doQuery(true);
            } else if (this.form.bizTypeCode === "B104") {
              this.$refs.dataTableB104.doQuery(true);
            } else if (
              this.form.BIZ_TYPE_CODE === "B309" ||
              this.form.BIZ_TYPE_CODE === "B310" ||
              this.form.BIZ_TYPE_CODE === "B311"
            ) {
              this.$refs.dataTableB309.doQuery(true);
            }
          });
        });
      }
    },

    cancel() {
      this.openState = false;
    },

    downloadFile(fileId) {
      if (fileId !== undefined && fileId !== "") {
        downloadfile(`${baseUrlConfig.downloadFile}`, fileId).then((response) => {
          let blob = new Blob([response.data], { type: "image/jpeg" });
          console.log(response);
          let objectUrl = URL.createObjectURL(blob);
          const link = document.createElement("a"); // 创建a标签
          link.href = objectUrl;
          // const fileNameSplit = response.headers['content-disposition'].split('=')
          // const fileName = decodeURI(fileNameSplit[fileNameSplit.length - 1]) // 跟后端约定好最后一个值为fileName字段
          link.download = fileId.split("||")[1]; // 自定义文件名

          link.click(); // 下载文件
          URL.revokeObjectURL(objectUrl); // 释放内存
        });
      } else {
        this.msgError("下载文件不存在");
      }
    },

  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
